/**
 * by zb 2018-03-14
 */

/*-------------------------
 * 初始化事件加载器
 -------------------------*/
var ee = new EventEmitter();
window.Events = {
    /**
     * 工具Tab切换初始化事件
     */
    ToolTabInitEvent: 'Tooltab_Init_Event',
    ToolTabActionEvent: 'Tooltab_Action_Event',
    ModuleTabEvent: 'Module_Tab_Event',//模块界面初始化
    ModuleCloseEvent: 'Module_Close_Event',//模块界面关闭
    GlobleMessageClickEvent: 'Globle_Message_Click_Event',//主界面滚动信息点击事件
    WarningInfoClickEvent: 'Warning_Info_Click_Event',//告警信息点击事件
    TimeChangeEvent: 'Time_Change_Event',//全局时间变化事件
    Cesium3DTileSelectedEvent: '3DTiles_Selected_Event',
    CesiumEntitySelectedEvent: 'Entity_Selected_Event',
//    ToolTabInitEvent: 'Tooltab_Init_Event',
    on: function (type, listener) {
        ee.addListener(type, listener);
    },
    off: function (type, listener) {
        ee.removeListener(type, listener);
    },
    removeEvent: function (type) {
        ee.removeEvent(type);
    },
    once: function (type, listener) {
        ee.addOnceListener(type, listener);
    },
    trigger: function (type, arguments) {
        ee.emitEvent(type, [].concat(arguments));
    }
};